using UnityEngine;
using System.Collections;

public class BouncingEnemy : MonoBehaviour {

	public float speed = 5f;
	public static int destroyed = 0;

	// Use this for initialization
	void Start () {

	}
	
	// Update is called once per frame
	void Update () {
			transform.position += new Vector3(-speed * Time.deltaTime,0,0);
		if (transform.position.x < -10) {
						Destroy (gameObject);
			BouncingEnemy.destroyed++;
				}
	}

	void OnTriggerEnter2D(Collider2D other) {

	}
}
